Show the propagate_immediately flag in agent details.

Akinori MUSHA 10 years ago
parent
commit
cf9cdfb3ac
2 changed files with 13 additions and 0 deletions
  1. 8 0
      app/helpers/application_helper.rb
  2. 5 0
      app/views/agents/show.html.erb

+ 8 - 0
app/helpers/application_helper.rb

@@ -7,6 +7,14 @@ module ApplicationHelper
7 7
     HTML
8 8
   end
9 9
 
10
+  def yes_no(bool)
11
+    if bool
12
+      '<span class="label label-info">Yes</span>'.html_safe
13
+    else
14
+      '<span class="label label-default">No</span>'.html_safe
15
+    end
16
+  end
17
+
10 18
   def working(agent)
11 19
     if agent.disabled?
12 20
       link_to 'Disabled', agent_path(agent), :class => 'label label-warning'

+ 5 - 0
app/views/agents/show.html.erb

@@ -116,6 +116,11 @@
116 116
                   None
117 117
                 <% end %>
118 118
               </p>
119
+
120
+              <p>
121
+                <b>Propagate immediately:</b>
122
+                <%= yes_no @agent.propagate_immediately %>
123
+              </p>
119 124
             <% end %>
120 125
 
121 126
             <% if @agent.can_create_events? %>